﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.IO.IsolatedStorage;

namespace HomeBuyerTools.FinanceProperties
{
      public class Common
        {
            public static string getSettingsValue(string keyname)
            {
                try
                {
                    string keyvalue = "";
                    var settings = IsolatedStorageSettings.ApplicationSettings;
                    if (settings.Contains(keyname))
                        keyvalue = settings[keyname].ToString();
                    return keyvalue;
                }
                catch (Exception ex)
                {
                    Exception exNew = new Exception("Exception in getSettingsValue Method In Common file\n\n" + ex.Message + " \n\n Stack Trace \n" + ex.StackTrace);
                    exNew.Data.Add("getkeyname", keyname);
                    throw exNew;
                }
            }

        }
    }

